jQuery(document).ready(function() {
	//创建JQGRID表格
	
	var grid = $("#table1").ligerGrid({
        columns: [
                  { display: '入库单号', name: 'powarecode', width: 200 },
                  { display: '采购编号', name: 'pocode', width: 180 },
                  { display: '仓库名称', name: 'whname', width: 150},
                  { display: '单据状态', name: 'billstatus', width: 120,
                	  render: function (item){
                		  var billStatus=item.billstatus;
                		  if(billStatus=="1"){
                			  return "主管审核中";
                		  }
                		  if(billStatus=="2"){
                			  return "经理审核中";
                		  }
                		  if(billStatus=="3"){
                			  return "审核完成";
                		  }
                		  if(billStatus=="4"){
                			  return "部分退货";
                		  }
                		  if(billStatus=="5"){
                			  return "全部退货";
                		  }
                		  if(billStatus=="0"){
                			  return "草稿";
                		  }
                	  }},
                  { display: '送货单位', name: 'songdw', width: 130 },
                  { display: '到货日期', name: 'dhrq', width: 130,
                	  render: function (item){
                		  var cdate=new Date(item.dhrq);
                		  return formatDate(cdate,"yyyy-MM-dd")
                	  }},
                  { display: '备注', name: 'remark', width: 150 }
                      ],  usePager: true,pageSize:30,
                      url : basic_Url+"/list.do",
                      width: "100%", height:"98%", checkbox: false,      
                      onDblClickRow : function (data, rowindex, rowobj){
                    	  edit(data);
                       }
                  });
	$("#pageloading").hide();
});

